package cn.xz.zysjz.activity;

import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.DataBindingUtil;
import androidx.recyclerview.widget.LinearLayoutManager;

import android.os.Build;
import android.os.Bundle;
import android.view.WindowManager;

import java.util.ArrayList;
import cn.xz.zysjz.R;
import cn.xz.zysjz.adapter.ActivityAdminListAdapter;
import cn.xz.zysjz.adapter.ActivityListAdapter;
import cn.xz.zysjz.bean.ActivityListBean;
import cn.xz.zysjz.bean.CommonLib;
import cn.xz.zysjz.databinding.ActivityAdminFkactivityBinding;
import cn.xz.zysjz.utils.SessionUtils;

public class AdminFKActivity extends AppCompatActivity {

    ActivityAdminFkactivityBinding mBinding;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        mBinding = DataBindingUtil.setContentView(this, R.layout.activity_admin_fkactivity);
        if (Build.VERSION.SDK_INT >= 21) {
            this.getWindow()
                    .setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
        }
        //列表设置
        initRV();
        mBinding.viewBack.setOnClickListener(v->{
            finish();
        });
    }


    private void initRV(){
        //列表相关数据
        LinearLayoutManager ms = new LinearLayoutManager(this);
        ActivityAdminListAdapter mAdapter = new ActivityAdminListAdapter(R.layout.item_admin_fk);
        mBinding.rvList.setLayoutManager(ms);
        mBinding.rvList.setAdapter(mAdapter);
        //获取反馈内容
        ArrayList<String> list = SessionUtils.getList(CommonLib.USER_FK, String.class);
        mAdapter.setList(list);
    }
}